package com.dc.designPattern._999_multi_pattern.demo_1;

import com.dc.designPattern._999_multi_pattern.demo_1.price.CalPriceFactory;

/**
 * Description: 多模式_策略_客户端
 * @author: gdc
 * @date: 2021/6/10
 * @version 1.0
 */
public class Client {

    public static void main(String[] args){
        CalPriceFactory.getInstance();

        Player player = new Player();
        player.buy(5000D);
        System.out.println("玩家需要付费：" + player.calLastAmount());

        player.buy(10000D);
        System.out.println("玩家需要付费：" + player.calLastAmount());

        player.buy(10000D);
        System.out.println("玩家需要付费：" + player.calLastAmount());

        player.buy(10000D);
        System.out.println("玩家需要付费：" + player.calLastAmount());

        player.buy(10000D);
        System.out.println("玩家需要付费：" + player.calLastAmount());
    }
}
